﻿#pragma once

/* 负责线程管理的相关内容*/

#include <memory>
#include <vector>

#include "G4VUserActionInitialization.hh"

//#include "globals.hh"
class DetectorConstruction;

class LETdMessenger;
class RgProjScorerMsgr;

class ActionInitialization : public G4VUserActionInitialization
{
public:
    ActionInitialization(DetectorConstruction*);
    virtual ~ActionInitialization() override;

    void BuildForMaster() const override;
    void Build() const override;

private:
    DetectorConstruction* _fDetector;

    // LETd messenger for thread master
private:
    mutable std::unique_ptr<LETdMessenger> _fLETdMsgrMaster;
    mutable std::vector<LETdMessenger*> _fLETdMsgrWorker;

    // projection range messenger for thread master
private:
    mutable std::unique_ptr<RgProjScorerMsgr> _rangeProjMsgrMaster;
    mutable std::vector<RgProjScorerMsgr*> _rangeProjMsgrWorker;
};
